<!--
 * @Description:余额变动卡片
 * @version: v1.0
 * @Author: Wang Xi
 * @Date: 2023-6-17 18:10:00
 * @LastEditors: WangXi
 * @LastEditTime: 2023-06-17 18:30:01
-->
<template>
	<view class="capitalDetail">
		<c-layout>
			<c-navigation-bar slot="head" :title="$t('user.personalAssets')"></c-navigation-bar>
			<view class="content">
				<view class="top">
					<u-avatar size="96"
						:src='$u.file.getMedieUrl(orderInfo.icon)'
						mode="circle"></u-avatar>
					<view class="">
						{{orderInfo.counterparty}}
					</view>
					<view :class="`sum ${orderInfo.inOut==1?'add':'subtract'}`" v-if='!orderInfo.incomeType'>
						{{`${orderInfo.inOut==1?'+':'-'}`+Number(orderInfo.amountIncurred).toFixed(2)}}
					</view>
					<view :class="`sum ${orderInfo.incomeType==1?'add':'subtract'}`" v-else>
						{{`${orderInfo.incomeType==1?'+':'-'}`+Number(orderInfo.goldAmount).toFixed(2)}}
					</view>
				</view>
				<view class="item">
					<view class="title">
						{{$t('storeManagement.orderStatus')}}
					</view>
					<view class="">
							{{orderInfo.status}}
					</view>
				</view>

				<view class="item">
					<view class="title">
						{{$t('storeManagement.timeOfPayment')}}
					</view>
					<view class="">
						{{publicJS.timeZoneSwitching(orderInfo.payDate)}}
					</view>
				</view>

				<view class="item">
					<view class="title">
						{{$t('user.commodity')}}
					</view>
					<view class="">
						{{orderInfo.productDesc}}
					</view>
				</view>
			<!-- 	<view class="item">
					<view class="title">
						{{$t('storeManagement.ShopName')}}
					</view>
					<view class="">
						{{orderInfo.counterparty}}
					</view>
				</view> -->

				<view class="item">
					<view class="title">
						{{$t('storeManagement.orderNumber')}}
					</view>
					<view class="">
						{{orderInfo.businessNo}}
					</view>
				</view>

				<view class="item">
					<view class="title">
						{{$t('storeManagement.PaymentOrderNumber')}}
					</view>
					<view class="">
						{{orderInfo.serialNumber}}
					</view>
				</view>

			</view>

		</c-layout>


	</view>
</template>

<script>
	let that = null
	export default {
		name: '',
		beforeCreate() {
			that = this
		},


		onLoad(val) {
			console.log(val)
		this.orderInfo=JSON.parse(val.data)
		},
		data() {
			return {
				orderInfo: {

				}
			}
		},
	}
</script>

<style lang="scss" scoped>
	.capitalDetail {
		font-family: PingFang SC;
		.sum {
			font-size: 40rpx;

			&.add {
				color: #4DD029;
			}

			&.subtract {
				color: #FF2D55;
			}
		}

		.content {
			padding: 40rpx;

			.top {
				height: 300rpx;
				line-height: 60rpx;
				text-align: center;
				border-bottom: 1px solid #ccc;
			}

			>.item {
				height: 120rpx;
				display: flex;
				align-items: center;

				.title {
					min-width: 280rpx;
					color: rgba(145, 144, 154, 1);
				}




			}
		}
	}
</style>